home *** CD-ROM | disk | FTP | other *** search
- #include <string.h>
-
- /************************************************************************/
-
- #undef strrchr
-
- #if defined(__GNUC__) && defined(mc68000)
-
- asm("
- .globl _strrchr
- _strrchr:
- movel sp@(4:W),a1
- movel sp@(8:W),d1
- moveq #0,d0
- L2: cmpb a1@,d1
- jne L1
- movel a1,d0
- L1: tstb a1@+
- jne L2
- rts
- ");
-
- #else
-
- char *strrchr(const char *String, int c)
-
- {
- char *Result;
-
- Result=NULL;
- do
- {
- if(*String==(char)c)
- {
- Result=(char *)String;
- }
- }
- while(*String++!='\0');
- return Result;
- }
-
- #endif
-